package week.six;

import android.opengl.GLSurfaceView;
import android.view.MotionEvent;
import android.content.Context;

public class Surface extends GLSurfaceView {
	
	private Display display;
	
	public Surface(Context context) {
		super(context);
		display = new Display();
		setRenderer(display);
	}
	
	public boolean onTouchEvent(final MotionEvent event) {
		queueEvent(new Runnable() {
			public void run() {
				display.setTouchPos(new Vec2(event.getX(), event.getY()));
			}
		});
		return true;
	}
}
